# # 定义一个Person类(普通方法)
# class person :
#     name = None
#     age = None

#     # 构造方法
#     def hello (self):
#         print(f"Hello, my name is {self.name} and I am {self.age} years old.")

# # 通过类创建对象供输入参数
# per1 = person()

# # 为对象添加信息
# per1.name = "张三"
# per1.age = 18
# per1.hello()




# 定义一个Person类(__init__方法)
class person :
    name = None
    age = None

    # 成员方法
    def say_hello (self):
        print(f"Hello, my name is {self.name} and I am {self.age} years old.")
    def __init__(self,name,age):
        self.name = name
        self.age = age

# 通过类创建对象
p = person("zs",18)
say_hello()
p.say_hello()
